package com.homily.com.test0;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

public class SecondActivity extends AppCompatActivity implements View.OnClickListener{

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_function);
        initview();
    }
    public void initview(){
        findViewById(R.id.bt_counter).setOnClickListener(this);
        findViewById(R.id.bt_androidWhere).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
    int id =v.getId();
    switch (id){
        case R.id.bt_counter:
            Intent intent=new Intent(this,CounterActivity.class);
            startActivity(intent);
            break;
        case R.id.bt_androidWhere:
            Intent intent0=new Intent(this,AndroidWhereActivity.class);
            startActivity(intent0);
            break;

    }
    }
}
